<?php
$con = mysql_connect("localhost","root","abc123");
if (!$con)
{
    die('Could not connect: ' . mysql_error());
}

mysql_select_db("northwinddb", $con);

$result = mysql_query('SELECT * FROM `nwproducts` LIMIT 0, 30 ');

while($row = mysql_fetch_array($result))
{
    echo $row['ProductName'] ;
    echo "<br />";
}

mysql_close($con);
?>